package top.hcode.hoj.pojo.vo;

import lombok.Data;
import top.hcode.hoj.pojo.entity.course.Question;
import top.hcode.hoj.utils.Constants;

/**
 * @author orangej
 * @since 2024/12/29
 */
@Data
public class QuestionVO extends Question {
    private String typeName;

    private String courseName;
    private String sectionName;
    private String lessonName;

    private String username;
    private String nickname;

    public String getTypeName() {
        if (typeName != null) {
            return typeName;
        }
        Constants.QuestionType type = Constants.QuestionType.getQuestionType(getType());
        typeName = type.getLabel();
        return typeName;
    }
}
